package cloud.xlh.my_system.controller.facial_recognition;

import cloud.xlh.my_system.service.facial_recognition.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.io.IOException;

@RestController
@RequestMapping("/facial_recognition")
public class UsersController {
	
	@Autowired
	private UserService userService;
	
	
	@RequestMapping(value = "register",method = RequestMethod.POST)
	public String register(String userName,String faceBase) throws IOException {
		return userService.register(userName , faceBase);
	}
	
	@RequestMapping(value = "login",method = RequestMethod.POST)
	public String login(String faceBase) {
		return userService.login(faceBase);
	}
}
